package list;

public abstract class AbstractList implements List {
	protected int size;

	public AbstractList() {
	}

	public AbstractList(Object[] objects) {
		for (Object object : objects) {
			add(object);
		}
	}

	@Override
	public void add(Object object) {
		add(size, object);
	}

	@Override
	public boolean isEmpty() {
		return size == 0;
	}

	@Override
	public int size() {
		return size;
	}
}
